package wxk.interview.aop.core.jdk.handler;

import java.lang.reflect.Method;

/**
 * @author wangxuekai
 * @version 1.0
 * @date 2017/3/5.
 */
public abstract class BeforeHandler extends AbstractHandler {

    public abstract void before(Object proxy,Method method,Object[] args);

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        before(proxy, method, args);
        return method.invoke(getTarget(),args);
    }
}
